$lineWidth: 3px;

section.agenda {
  color: $color-gray;
  position: relative;
  padding-bottom: 120px;

  .agenda-content {
    overflow: hidden;
    margin-top: 50px;
  }

  .agenda-body {
    display: flex;
    justify-content: space-between;
    width: 90%;
    height: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .agenda-nav {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 21%;
    font-size: 1.1rem;
    text-align: center;

    a.item {
      position: relative;
      display: block;
      color: $color-gray;
      height: 25%;
      display: flex;
      flex-direction: column;
      flex-grow: 1;
      justify-content: center;
      transition: color 0.3s;

      .item-info {
        font-weight: bold;
        transition: color 0.3s;

        &:hover {
          color: $color-brown;
        }
      }

      &::before {
        content: '';
        display: block;
        position: absolute;
        width: $lineWidth;
        height: 100%;
        left: 0;
        top: -50%;
        background-color: $color-gray;
        z-index: 9;
      }

      &::after {
        content: '';
        display: block;
        position: absolute;
        width: 12px;
        height: 12px;
        background-color: #000;
        left: 0;
        top: 50%;
        border-radius: 50%;
        border: $lineWidth solid $color-gray;
        transform: translateX(-4.5px) translateY(-50%);
        z-index: 10;
      }

      &:first-child {
        &::before {
          height: 50%;
          top: 0;
        }
      }

      &:last-child {
        &::before {
          height: 150%;
        }
      }
      .item-info::before,
      .item-info::after {
        content: '';
        transition: all 0.3s;
        opacity: 0;
        display: block;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        height: $lineWidth;
        width: 0;
        background-color: $color-brown;
      }
      .item-info::before {
        left: 0;
      }

      .item-info::after {
        right: 0;
      }


      &.active {
        color: $color-brown;

        .item-info::before,
        .item-info::after {
          width: 25%;
          opacity: 1;
        }
      }

      &.active::before,
      &.preterite::before {
        background-color: $color-brown;
      }

      &.active::after,
      &.preterite::after {
        border-color: $color-brown;
      }
    }

    &::after {
      content: '';
      width: 0;
      height: 75%;
      position: absolute;
      top: 50%;
      right: 0;
      transform: translateY(-50%);
      border-right: $lineWidth solid $color-brown;
    }
  }

  .agenda-list-container {
    width: 72%;
    height: 100%;

    h4 {
      font-size: 1.3rem;
      margin-bottom: 10px;
      font-weight: normal;
    }

    p {
      margin: 0;
      line-height: 1.5;
    }

    .selection {
      display: flex;
      align-items: center;

      a.apply {
        display: inline-block;
        color: #fff;
        background-color: $color-brown;
        padding: 8px 25px;
        margin-top: 20px;

        .icon-arrow {
          font-size: 14px;
          @include arrow-anim(9px);
        }

        &.disable {
          background-color: #5f5f5f;
          cursor: no-drop;

          .icon-arrow {
            display: none;
          }
        }
      }
    }

    .audit {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;

      .audit-container {
        height: 310px;
        overflow: hidden;
      }

      .swiper-button-next {
        transform: scale(0.6) translateX(350%);
        @include next-arrow('9b9b9b');
        transition: all 0.3s;

        &:hover {
          @include next-arrow('a28356');
        }
      }

      .swiper-button-prev {
        transform: scale(0.6) translateX(-350%);
        @include prev-arrow('9b9b9b');
        transition: all 0.3s;

        &:hover {
          @include prev-arrow('a28356');
        }
      }

      .swiper-button-disabled {
        opacity: 0;
      }

      .swiper-pagination-bullet {
        background-color: transparent;
        border: 1px solid $color-gray;
        opacity: 1;
        width: 9px;
        height: 9px;
        margin: 0 7px;

        &.swiper-pagination-bullet-active {
          border-color: $color-brown;
        }
      }

      .swiper-slide {
        padding: 0 5px;
      }
    }

    .vote {
      .vote-info {
        height: 360px;
        overflow: auto;
        padding: 0 10px 0 5px;
        /* 设置滚动条的样式 */
        &::-webkit-scrollbar {
            width: 5px;
        }

        /* 滚动槽 */
        &::-webkit-scrollbar-track {
          background-color: transparent;
        }

        /* 滚动条滑块 */
        &::-webkit-scrollbar-thumb {
          background: rgba(255, 255, 255, 0.2);
          border-radius: 5px;
          box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
        }
        &::-webkit-scrollbar-thumb:window-inactive {
            background: rgba(255, 255, 255, 0.1);
        }
      }

      b {
        display: block;
        margin-top: 10px;
      }
    }

    .ceremony {

      .ceremony-pagination {
        display: flex;
        justify-content: space-around;
        top: 0;
        transform: none;
        margin-bottom: 15px;
      }

      .swiper-pagination-bullet {
        width: auto;
        height: auto;
        background-color: transparent;
        opacity: 1;
        padding: 5px 20px;

        &.swiper-pagination-bullet-active {
          color: $color-brown;
        }
      }

      .product-wrapper {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        align-content: center;
      }

      .product {
        width: 100% * 1 / 6;
        text-align: center;
        margin-bottom: 40px;
        padding: 0 5px;

        .p-icon {
          display: inline-block;
          width: 80px;
          height: 80px;
          background-size: cover;
          background-position: center;
          border-radius: 20px;
        }

        .p-name {
          color: $color-brown;
        }

        .p-type {
          font-size: 14px;
        }
      }

      .waiting-wrapper {
        display: flex;
        justify-content: center;
      }
      .waiting-text {
        font-size: 2.4rem;
        color: $color-brown;
        margin-top: 80px;
        letter-spacing: 10px;
      }
    }
  }

  &:before {
    content: '';
    position: absolute;
    left: -80px;
    top: 50%;
    opacity: 0.1;
    @include bg-element(65%);
    transform-origin: center;
    transform: rotateX(180deg) rotateY(180deg) translateY(50%);
  }
}


@media (max-width: 750px) {
  section.agenda {
    .agenda-body {
      width: 100%;
      height: auto;
      flex-direction: column;

      .agenda-nav {
        flex-direction: row;
        width: 100%;
        z-index: 20;
        padding-top:20px;
        margin-bottom: 20px;

        &:after {
          display: none;
        }

        a.item {
          width: 25%;

          .item-info {
            font-weight: normal;
            font-size: 14px;
            padding-top: 25px;

            &:after {
              display: none;
            }

            &:before {
              width: 2px;
              height: 0px;
              top: 0;
              left: 50%;
              transform: translateX(-50%);
            }
          }

          &.active .item-info:before {
            height: 20px;
          }

          &:first-child {
            &:before {
              width: 50%;
              transform: translateX(0);
            }
          }

          &:last-child {
            &:before {
              width: 150%;
              transform: translateX(-100% / 3);
            }
          }

          &:before {
            width: 100%;
            height: 2px;
            top: 0;
            left: 0;
            transform: translateX(-50%);
          }

          &:after {
            top: 0;
            left: 50%;
            transform: translate(-50%, -50%);
          }
        }
      }

      .agenda-list-container {
        overflow: hidden;
        width: 100%;
      }
    }

    .audit {
      .swiper-button-prev,
      .swiper-button-next {
        display: none;
      }
    }

    .ceremony-container {
      height: 650px;
      display: flex;
      overflow: hidden;
    }

    .agenda-list-container {
      height: auto;

      .vote .vote-info {
        height: auto;
        overflow: hidden;
      }

      .ceremony {
        overflow: hidden;

        .product-wrapper {
          align-content: flex-start;
        }

        .product {
          margin-bottom: 5px;
          width: 100% * 1 / 3;

          .p-icon {
            width: 60px;
            height: 60px;
          }
        }

        .ceremony-pagination {
          display: flex;
          flex-direction: column;
          transform: none;
          margin-bottom: 0;
        }

        .swiper-pagination-bullet {
          &.swiper-pagination-bullet-active {
            color: #fff;
            background-color: $color-brown;
            border-radius: 0;
          }
        }
      }
    }
  }
}
